package com.fht.mapper.shop;

import com.fht.entity.ShopAssistant;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Set;

public interface ShopAssistantMapper extends Mapper<ShopAssistant> {
    @Select("select * from shop_assistant where username=#{username}")
    ShopAssistant findByUsername(@Param("username") String username);


    @Select("select role_name from user_role_view where username=#{username}")
    Set<String> findRolesByUsernaem(@Param("username") String username);


    //根据角色信息查询权限信息
    Set<String> findPermissionsByRoles(HashMap<String, Object> map);

    @Select("select * from filter_chain order by ordered asc")
    LinkedHashMap<String, String> findShiroFilterChain();
}
